<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
	#div1 {width: 200px;height: 200px;background: red;border: 1px solid black;}	
</style>
<script>
	function getStyle(obj,name)
	{
			if(obj.currentStyle)
				{
						return obj.currentStyle[name];
				}else{
						return getComputedStyle(obj,false)[name];
				}
	}
	
setInterval(function(){
	var oDiv = document.getElementById('div1');
	//console.log(parseInt(oDiv.style.width));
	
	oDiv.style.width =parseInt(getStyle(oDiv,'width')) -1 +'px';
},200);	
</script>
</head>

<body>
<div id="div1"></div>
</body>
</html>
